package tech.aistar.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 本类用来演示: 注解的配置方式
 *
 * @author: success
 * @date: 2021/5/10 8:39 上午
 */
@Controller
@RequestMapping("/day02")
public class AnnoController {
    @GetMapping("/hello.action")
    public String hello(Model model){
        model.addAttribute("username","admin");

        //默认的就是转发
       // return "/WEB-INF/hello/hello.jsp";
        return "hello/hello";
    }
}
